define('utils/Client', null, function() {

var Client = function() {};
Client.getClientSequence = function() {
    var a = window.navigator.userAgent;
    var types = Client.TYPES;
    var browsers = Client.BROWSERS;
    var ret = '';

    for(var i=0, len=types.length; i<len; i++) {
        if(a.indexOf(types[i].flag) >= 0) {
            ret = types[i].sequence;

            break;
        }
    }

    for(var i=0, len=browsers.length; i<len; i++) {
        if(a.indexOf(browsers[i].flag) >= 0) {
            ret = ret + ':' + browsers[i].sequence;

            break;
        }
    }

    return ret;
};
Client.TYPES = [
    {flag: 'Windows NT', sequence: 'windows'},
    {flag: 'Windows Phone', sequence: 'windowsphone'},
    {flag: 'Macintosh', sequence: 'macintosh'},
    {flag: 'Android', sequence: 'android'},
    {flag: 'iPhone', sequence: 'iphone'},
    {flag: 'iPad', sequence: 'ipad'},
    {flag: 'iPod', sequence: 'ipod'},
    {flag: 'BlackBerry', sequence: 'blackberry'},
    {flag: 'SymbianOS', sequence: 'symbianos'}
];
Client.BROWSERS = [
    {flag: 'MSIE', sequence: 'ie'},
    {flag: 'Edge', sequence: 'edge'},
    {flag: 'Opera', sequence: 'opera'},
    {flag: 'Firefox', sequence: 'firefox'},
    {flag: 'Chrome', sequence: 'chrome'},
    {flag: 'Safari', sequence: 'safari'}
];

return Client;

});
